Reading Characteristic Data PRO
HealthKit stores characteristics as immutable personal attributes, such as biological sex, date of birth, blood type, skin type, wheelchair usage, and activity move mode. These values are typically entered by the user in the Health app and rarely change.
The Scripting app provides global asynchronous APIs for accessing these values.
Supported Characteristics
You can read the following characteristics:
1. Read Date of Birth
Returned object conforms to DateComponents:
2. Read Biological Sex
3. Read Blood Type
4. Read Fitzpatrick Skin Type
5. Read Wheelchair Use Status
6. Read Activity Move Mode
Error Handling
Each method may throw an error if:
- The characteristic is not set by the user
- The permission is denied
- HealthKit is unavailable
Example:
Summary
You can access personal attributes using the following global APIs:
These values are static and reflect the user’s personal configuration in the Health app. Be sure to handle missing or unset values gracefully.
